home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
hdebug.zip
/
TEST.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1991-10-20
|
762b
|
41 lines
{$M 16384,0,65536}
Program Test;
uses
CRT,DOS,
Heap, { Intercept the allocation/deallocation routines. }
HDebug10, { Flag errors to the user. }
MapInfo; { Get the offending unit name and line number. }
Procedure Main;
type
A1 = Array[1..30000] of Integer;
var
i : Integer;
P1,P2 : ^A1;
Begin
P1 := nil;
Dispose(P1);
for i := 1 to 2 do
begin
if (i = 2) then
InterceptFatalHeapErrors := False;
New(P1);
New(P2); { if i=2, the program should crash normally }
Dispose(P1);
Dispose(P1);
end;
End;
BEGIN
ClrScr;
MapFileName := 'test.map';
HeapOn;
Main;
END.